from django.shortcuts import render

# Create your views here.


from .models import Banner
from rest_framework.generics import ListAPIView
from rest_framework.viewsets import ViewSetMixin
from django.conf import settings
from . import serializer

class BannerView(ViewSetMixin,ListAPIView):
    queryset = Banner.objects.filter(is_delete=False,is_show=True).order_by('-orders')[:settings.BANNER_COUNT]
    serializer_class = serializer.BannerSerializer